package com.haihui.platform.service.impl.dust;

import com.haihui.platform.dao.dust.DustDao;
import com.haihui.platform.entity.*;
import com.haihui.platform.service.dust.DustService;
import com.sun.rowset.internal.Row;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


import java.util.List;

/**
 * Created by HaiHui on 2017/10/13.
 */
@Service
public class DustServiceImpl implements DustService {
    @Autowired
    DustDao dustDao;

    /**
     * list
     * @param model
     * @param pagingBean
     * @return
     */
    public List<DustBaseModel> list(DustBaseModel model, PagingBean pagingBean) {

        return dustDao.list(model,pagingBean);
    }

    /**
     * 分页用
     * @param model
     * @return
     */
    public int getCount(DustBaseModel model){
        return dustDao.getCount(model);
    }

    /**
     * add
     * @param model
     * @return
     */
    public int add(DustBaseModel model){
        return dustDao.add(model);
    }

    /**
     * update
     * @param model
     * @return
     */
    public int update(DustBaseModel model){return dustDao.update(model);}

    /**
     * detail
     * @param model
     * @return
     */
    public DustBaseModel detail(DustBaseModel model){return dustDao.detail(model);}

    /**
     * 查询区
     * @param region
     * @return
     */
    public List<Region> selectRegions(Region region){return dustDao.selectRegions(region);}

    /**
     * 添加区
     * @param region
     * @return
     */
    public int addRegion(Region region){return  dustDao.addRegion(region);}

    /**
     * 修改区
     * @param region
     * @return
     */
    public int updateRegion(Region region){return dustDao.updateRegion(region);}

    /**
     * 删除区
     * @param region
     * @return
     */

    public int deleteRegion(Region region){return dustDao.deleteRegion(region);}

    /**
     * 查询行
     * @param rowModel
     * @return
     */

    public List<RowModel> selectRows(RowModel rowModel){return dustDao.selectRows(rowModel);}

    /**
     * 添加行
     * @param rowModel
     * @return
     */
    public int addRow(RowModel rowModel){return dustDao.addRow(rowModel);}

    /**
     * 更新行
     * @param rowModel
     * @return
     */

    public int updateRow(RowModel rowModel){return dustDao.updateRow(rowModel);}

    /**
     * 删除行
     * @param rowModel
     * @return
     */

    public int deleteRow(RowModel rowModel){return dustDao.deleteRow(rowModel);}

    /**
     * 查询墓穴
     * @param graveModel
     * @return
     */

    public List<GraveModel> selectGraves(GraveModel graveModel){
        return dustDao.selectGraves(graveModel);
    }

    /**
     * 添加墓穴
     * @param graveModel
     * @return
     */
    public int addGrave(GraveModel graveModel){
        return dustDao.addGrave(graveModel);
    }

    /**
     * 更新墓穴
     * @param graveModel
     * @return
     */
    public int updateGrave(GraveModel graveModel){
        return dustDao.updateGrave(graveModel);
    }
    /**
     * 删除墓穴
     */
    public int deleteGrave(GraveModel graveModel){
        return dustDao.deleteGrave(graveModel);
    }
    /**
     * 添加墓穴更新公墓用
     */
    public int updateDustByGrave(DustBaseModel model){return dustDao.updateDustByGrave(model);}
    /**
     * 删除墓穴更新公墓用
     */
    public int deleteDustByGrave(DustBaseModel model){return dustDao.deleteDustByGrave(model);}
    /**
     * 分配墓穴更新公墓用
     */
    public int updateByFirstGrave(DustBaseModel model){return dustDao.updateByFirstGrave(model);}
    /**
     * 分配墓穴合葬更新公墓用
     */
    public int updateBySecondGrave(DustBaseModel model){return dustDao.updateBySecondGrave(model);}


}
